{extend name="base" /}
{block name="body"}
<div class="admin-main layui-form layui-field-box">
	<button class="layui-btn layui-btn-sm" onclick="window.history.go(-1);">返回</button>
	<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
		<legend>添加版块</legend>
	</fieldset>
	<!--tab标签-->
	<div class="layui-tab-brief">
	  	<div class="">
	  		<div class="layui-tab-item layui-show">
		  		<form class="layui-form form-container"  data-url="{:url('admin/forumForum/save')}"  localtion-url="{:url('forumForum/index')}">
				   	<div class="layui-form-item">
						<label class="layui-form-label"><text style="color:red;">*&nbsp;</text>名称</label>
						<div class="layui-input-inline">
					  		<input type="text" name="forum_name" lay-verify="is_name" placeholder="请输入名称" autocomplete="off" class="layui-input">
						</div>
					</div>
				   	<div class="layui-form-item">
						<label class="layui-form-label"><text style="color:red;">*&nbsp;</text>排序</label>
						<div class="layui-input-inline">
						 	<input type="text" name="sort_order" placeholder="请输入排序值" autocomplete="off" class="layui-input" value="0">
						</div>
						<div class="layui-form-mid layui-word-aux">数字越小排序越前(最小值为0)</div>
				  	</div>
				  	<div class="layui-form-item">
						<label class="layui-form-label">是否显示</label>
						<div class="layui-input-inline">
							<input type="checkbox" name="is_show" lay-skin="switch" lay-text="显示|隐藏" lay-filter="switchshow"  value="1"  checked>
						</div>
				  	</div>

				  	<!-- <div class="layui-form-item" style="width: 300px;">
						<label class="layui-form-label">所属板块</label>
						<div class="layui-input-block">
						  	<select name="tid">
						  		<option value="0">顶级板块</option>
						  		{volist name="category_level_list" id="vo"}
						  			<option value="{$vo.forum_id}">{neq name="vo.level" value="1"}|{php}for($i=1;$i<$vo['level'];$i++){echo ' --';}{/php}{/neq}{$vo.forum_name}</option>
						  		{/volist}
						  	</select>
						</div>
				  	</div> -->

				  	<div class="layui-form-item layui-form-text">
						<label class="layui-form-label">描述</label>
						<div class="layui-input-block">
					  		<textarea name="forum_desc" placeholder="请输入描述" class="layui-textarea"></textarea>
						</div>
				  	</div>
				  	<div class="layui-form-item">
			            <input type="hidden" name="id" value="{$meetingInfo.id}">
			            <div class="layui-input-block">
                			<button class="layui-btn layui-btn-sm" lay-submit lay-filter="formadd">立即提交</button>
						</div>
					</div>

					<!-- <div class="btable-paged" >
						<div class="layui-main">
							<div class="formbtngroup">
								<button  class="layui-btn layui-btn-sm" lay-submit="" lay-filter="formadd">添加</button>
								<button onclick="history.go(-1);" class="layui-btn layui-btn-primary layui-btn-sm">返回</button>
							</div>
						</div>
					</div> -->
				</form>
			</div>
		</div>
	</div>
</div>
{/block}

{block name="js"}
<script type="text/javascript" src="__PUBLIC__/js/formadd.js"></script>
{/block}
{block name="script"}
<script>
layui.use(['form', 'jquery'],function(){
  var form = layui.form
  ,jq = layui.jquery;
  
  form.verify({
  	is_name: function (value) {
		if (value.length == '') {
			return '名称不能为空';
		}
	},
  });

})
</script>
{/block}